<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%
	request.setCharacterEncoding("UTF-8");
	String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<%
	SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
	String date= format.format(new Date());
%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/argeeCommon.jsp"%>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/againstAuditCommon.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
	<script type="text/javascript" src="<%=path%>/common/stopBrowerBack.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bombBox.css" >

<style type="text/css">
table tr{
	height: 20px;padding-top: 20px;
}
table td {
	padding-top: 10px;
}
input[type=checkBox] {
	width: 15px
}
li span{
margin-left: 0px;
cursor: pointer;
}
li span:hover{
color: #427dff
}

input {
	width: 230px;
	height: 31px;
}
.div_input_hang{
	width: 100%;
	height: 40px;
}
.input_hang {
	float: left;
	width: 500px;
	height: 40px;
}

/*.panel.window{
	bottom: 100px;
}
.window-shadow{
	top:-320px;
	height: 120px;
}*/
</style>
</head>
<body style="background: #f5f5f5">
<div class="main">
	<div class="weizhi">
		学员管理>>转班申请>>详情
	</div>
	
	<div id="modal-overlay">
			    
	</div>
		<div class="modal-data">
            <div style="height: 60px">
                <ul>
                    <li style="text-align: left;height: 40px;line-height: 40px">
                        <span style="margin-left: 30px;">名称：</span>
                        <span>
				  		 	<input style="width: 100px" value=""  class="myname" type="text">
				  		</span>
                        <span style="margin-left: 20px">电话号码：</span>
                        <span>
				  		 	<input style="width: 100px" class="cflxdh" type="text">
				  		</span>
                        <span style="margin-left: 20px;">开始时间：</span><span><input class="scinput1" name="beginTime"
                                                                                  type="text"
                                                                                  onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}',dateFmt:'yyyy-MM-dd'})"
                                                                                  id="datemin" class="input-text"
                                                                                  style="width:100px;"
                                                                                  value="${beginTime}"></span>
                        <span style="margin-left: 20px;">结束时间：</span>
                        <span><input class="scinput1" name="endTime" type="text"
                                                       onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})"
                                                       id="datemax" class="input-text" style="width:100px;"
                                                       value="${endTime}"></span>
                        <span>
				  			<button class="findBtn">
				  				查询
				  			</button>
				  		</span>
                    </li>
                </ul>
            </div>
			
			    <div style="width:100%; height:350px; overflow:scroll;">
			      <form action="">
			        <table class="head2" id="studebntList" style="width: auto;white-space:nowrap;border-spacing: 0px">
			        <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
			        <td><input style="width: 15px;" type="checkbox" class="check" /></td>
					<td>学员名称</td>
					<td>编码</td>
					<td>身份证号码</td>
					<td>入学日期</td>
					<td>手机</td>
					<td>联系电话</td>
					<td>出生日期</td>
					<td>简称</td>
					<td>描述</td>
					<td>创建时间</td>
					<td>创建者</td>
					<td>创建者用户名</td>
					<td>最后修改时间</td>
					<td>最后修改者</td>
					<td>修改者用户名</td>
					<td>财务组织</td>
					<td>国籍</td>
					<td>民族</td>
					<td>家庭地址</td>
					<td>联系地址</td>
					<td>暂住证号</td>
					<td>邮政编码</td>
					<td>电子邮箱</td>
					<td>申领类型</td>
					<td>现准驾车型号</td>
					<td>申请现准驾车型号</td>
					<td>推荐人</td>
					<td>班级</td>
					<td>金额</td>
					<td>本地/异地</td>
					<td>培训类型</td>
					<td>备注</td>
					<td>性别</td>
					<td>学员状态</td>
					<td>培训计时卡</td>
					<td>已收</td>
					<td>欠费</td>
					<td>科目一考试次数</td>
					<td>科目二考试次数</td>
					<td>科目三考试次数</td>
					<td>部门</td>
					<td>科目一合格日期</td>
					<td>科目二合格日期</td>
					<td>科目三合格日期</td>
					<td>准考证明编号</td>
					<td>手续状态</td>
					<td>存放位置</td>
					<td>科目一不及格时间</td>
					<td>科目二不及格时间</td>
					<td>科目三不及格时间</td>
					<td>本校/外校</td>
					<td>结业证编号</td>
					<td>科目二退练日期</td>
					<td>科目二退练次数</td>
					<td>科目二退练原因</td>
					<td>科目三退练日期</td>
					<td>科目三退练次数</td>
					<td>科目三退练原因</td>
					<td>拼音首字母</td>
					<td>拼音</td>
					<td>技能表已交接</td>
					<td>档案已交接</td>
					<td>名称</td>
					<td>科目二练车班次</td>
					<td>科目三练车班次</td>
					<td>模拟考次数</td>
					<td>科目一缺考次数</td>
					<td>模拟考分数</td>
					<td>模拟考时间</td>
					<td>科目二缺考次数</td>
					<td>科目二缺考时间</td>
					<td>科目一缺考时间</td>
					<td>科目三缺考次数</td>
					<td>科目三缺考时间</td>
					<td>优惠券</td>
					<td>存放位置</td>
					<td>三年清零</td>
					<td>五次清零</td>
					<td>预约考试备注</td>
					<td>预约练车备注</td>
			        </tr>
			 <c:forEach items="${students}" var="student" varStatus="s">
			 	<tr class="studentData">
					<td><input type="checkbox"  name="student" style="width: 15px;"   value="${student.fid}"/></td>				
					<td>${student.fnameL2}</td>
					<td>${student.fnumber}</td>
					<td>${student.cfidcardno}</td>
					<td>${student.cfrxsj}</td>
					<td>${student.cfsjhm}</td>
					<td>${student.cflxdh}</td>
					<td>${student.cfbirthdays}</td>
					<td>${student.fsimplename}</td>
					<td>${student.fdescriptionL1}</td>
					<td>${student.fcreatetime}</td>
					<td>${student.fcreateName}</td>
					<td>${student.fcreateName}</td>
					<td>${student.flastupdatetime}</td>
					<td>${student.flastupdateName}</td>
					<td>${student.flastupdateName}</td>
					<td>${student.cfficompanyName}</td>
					<td></td>
					<td>${student.cfnation}</td>
					<td>${student.cfaddress}</td>
					<td>${student.cflinkaddress}</td>
					<td>${student.cfzzzh}</td>
					<td>${student.cfyzbm}</td>
					<td>${student.cfemail}</td>
					<c:if test="${student.cfsllx eq 1}">
					<td>初次申领</td>
					</c:if>
					<c:if test="${student.cfsllx ne 1}">
					<td>增加准驾车型</td>
					</c:if>
					<td>${student.cfxzjcxdh}</td>
					<td>${student.cfslzjcxdh}</td>
					<td>${student.cftjrName}</td>
					<td>${student.cfclazzName}</td>
					<td>${student.cfamount}元</td>
					<c:if test="${student.cflocal eq 1}">
					<td>本地</td>
					</c:if>
					<c:if test="${student.cflocal eq 2}">
					<td>异地</td>
					</c:if>
					<c:if test="${student.cflocal ne 1&&student.cflocal ne 2 }">
					<td></td>
					</c:if>
					<td>${student.cftrainTypeNAME}</td>
					<td>${student.cfremark}</td>
					<c:if test="${student.cfsex eq 1}">
					<td>男</td>
					</c:if>
					<c:if test="${student.cfsex eq 2}">
					<td>女</td>
					</c:if>
					<c:if test="${student.cfsex ne 1&&student.cfsex ne 2 }">
					<td></td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 1}">
					<td>已报名 </td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 2}">
					<td>科目一通过</td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 3}">
					<td>科目一未通过</td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 4}">
					<td>科目二通过</td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 5}">
					<td>科目二未通过</td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 6}">
					<td>科目二练车中 </td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 7}">
					<td>科目三通过</td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 8}">
					<td>科目三未通过</td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 9}">
					<td>科目三练车中</td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 10}">
					<td>已结业</td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 11}">
					<td>已退学 </td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 12}">
					<td>模拟考试合格 </td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 13}">
					<td>已过期 </td>
					</c:if>
					<c:if test="${student.cfstudentstate eq 14}">
					<td>作废</td>
					</c:if>
					<td>${student.cftimecard}</td>
					<td>${student.cfreceived}元</td>
					<td>${student.cfarrearage}元</td>
					<td>${student.cfkmykss}</td>
					<td>${student.cfkmekss}</td>
					<td>${student.cfkmskss}</td>
					<td>${student.cfdepartment}</td>
					<td>${student.cfkmyherq}</td>
					<td>${student.cfkmehgrq}</td>
					<td>${student.cfkmshgrq}</td>
					<td>${student.cfzkzmbh}</td>
					<td>${student.cfdazt}</td>
					<td>${student.cfcfwz}</td>
					<td>${student.cfkmybjgsj}</td>
					<td>${student.cfkmebjgsj}</td>
					<td>${student.cfkmsbjgsj}</td>
					<c:if test="${student.cfbxwx eq 1}">
					<td>本校</td>
					</c:if>
					<c:if test="${student.cfbxwx eq 2}">
					<td>外校</td>
					</c:if>
					<c:if test="${student.cfbxwx ne 1&&student.cfbxwx ne 2 }">
					<td></td>
					</c:if>
					<td>${student.cfjsybh}</td>
					<td>${student.cfkmetlrq}</td>
					<td>${student.cfbimudf0060}</td>
					<td>${student.cfbimudf0061}</td>
					<td>${student.cfkmstlrq}</td>
					<td>${student.cfkmstlcs}</td>
					<td>${student.cfkmstlyy}</td>
					<td>${student.cfshortpinyin}</td>
					<td>${student.cfpinyin}</td>
					<c:if test="${student.cfjnbjj eq 1}">
					<td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
					</c:if>
					<c:if test="${student.cfjnbjj ne 1}">
					<td><input type="checkbox"  value="0" disabled="disabled"/></td>
					</c:if>
					<c:if test="${student.cfdajj eq 1}">
					<td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
					</c:if>
					<c:if test="${student.cfdajj ne 1}">
					<td><input type="checkbox"  value="0" disabled="disabled"/></td>
					</c:if>
					<td>中国</td>
					<td>${student.cfkmelcsjName}</td>
					<td>${student.cfkmslcsjName}</td>
					<td>${student.cfmnkcs}</td>
					<td>${student.cfkmyqkcs}</td>
					<td>${student.cfmnkfs}</td>
					<td>${student.cfmnksj}</td>
					<td>${student.cfkmeqkcs}</td>
					<td>${student.cfkmeksqksj}</td>
					<td>${student.cfkmyksqksj}</td>
					<td>${student.cfkmsqkcs}</td>
					<td>${student.cfkmsksqksj}</td>
					<td>${student.cfyhj}</td>
					<td>${student.cfcfwz}</td>
					<c:if test="${student.cfsnql eq 1}">
					<td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
					</c:if>
					<c:if test="${student.cfsnql ne 1}">
					<td><input type="checkbox"  value="0" disabled="disabled"/></td>
					</c:if>
					<c:if test="${student.cfwcql eq 1}">
					<td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
					</c:if>
					<c:if test="${student.cfwcql ne 1}">
					<td><input type="checkbox"  value="0" disabled="disabled"/></td>
					</c:if>
					<td>${student.cftrainbespeakremark}</td>
					<td>${student.cfexambespeakremark}</td>							
					<%-- <td>
						<img alt="" height="11px" src="<%=path%>/images/list/xg.png">
						<a href="<%=path%>/DrivingSys/selectStudentByFid?fid=${student.fid}" class="tablelink">修改</a>&nbsp;&nbsp;&nbsp;
						&nbsp;&nbsp;&nbsp;<img alt="" height="11px" src="<%=path%>/images/list/sc.png">
						<a onclick="delStudent('${student.fid}')" class="tablelink">删除</a>&nbsp;&nbsp;&nbsp;
				    </td> --%>
				</tr>
			    </c:forEach>
			        	
			        	
			        </table>
			        
			      </form>
			      </div>
			      
	 <div class="page" style="display: none;">
			<ul style="border-bottom: none;">
				<li>
					<span class="indexPage">首页</span>
					<span class="prevPage">上一页</span>
					<span class="nextPage">下一页</span>
					<span class="endPage">尾页</span>
					<input type="hidden" id="totalPage" value="${pb}" >
					<input type="hidden" id="index" value="0">
				</li>
			</ul>
	 </div>
			      
			      <button class="subtn" style="width: 150px;position: absolute;bottom: 35px;font-size: 16px;left: 250px" >
			      	确定
			      </button>
			      <button class="btn" style="width: 150px;position: absolute;bottom: 35px;font-size: 16px;right: 250px" >
			      	关闭
			      </button>
			      
			      
			</div>
			

		
		
            <div class="modal-data1">
				<div style="height: 60px">
				 <ul>
				  	<li  style="text-align: left;margin-left: 60px;height: 40px;line-height: 40px">
				  		<span>名称：</span>
				  		<span>
				  		 	<input class="name1" type="text" >
				  		</span>
				  		<span>
				  			<button class="findBtn1">
				  				查询
				  			</button>
				  		</span>
				  	</li>
				 </ul>
				</div>
				<div style="width:100%; height:350px; overflow:scroll;">
			      <form action="">
			        <table class="head1"  style="width: auto;white-space:nowrap;border-spacing:0px">
			        <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
			        <td style="width: 20px"></td> 
			        <td>
			        	编码
			        </td>
			        <td>
			        	名称
			        </td>
			        <td>
			        	金额
			        </td>
			        <td>
			        	简称
			        </td>
			        <td>
			        	描述
			        </td>
			        <td>
			        	创建时间
			        </td>
			        <td>
			        	用户名
			        </td>
			        <td>
			        	最后修改时间
			        </td>
			        <td>
			        	用户名
			        </td>
			        <td>
			        	财务组织
			        </td>
			        <td>
			        	适用车辆
			        </td>
			        <td>
			        	是否包考试费
			        </td>
			        <td>
			        	是否包练车
			        </td>
			        <td>
			        	VIP
			        </td>
			        <td>
			        	特训班
			        </td>
			        <td>
			        	状态
			        </td>
			        </tr>
			        <c:forEach items="${clazzs}" var="clazz" >
			        	<tr class="clazzData" style="margin-top: 45px" >
			        		<td>
			        		 	<input style="width: 15px;height: 15px" type="checkbox" name="train"  value="${clazz.fid}">
			        		</td>
			        		<td>${clazz.fnumber}</td>
			        		<td>${clazz.fnameL2}</td>
			        		<td>${clazz.cfprice}</td>
			        		<td>${clazz.fsimplename}</td>	
			        		<td>${clazz.fdescriptionL2}</td>
			        		<td>${clazz.fcreatetime}</td>		
			        		<td>${clazz.createName}</td>
			        		<td>${clazz.flastupdatetime}</td>	
			        		<td>${clazz.updateName}</td>		
			        		<td>${clazz.cfficompanyName}</td>
			        		<td>${clazz.cfsycl}</td>	
			        		<c:if test="${clazz.cfksf ne 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cfksf eq 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cflc ne 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cflc eq 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cfvip ne 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cfvip eq 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cftx ne 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cftx eq 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
			        		</c:if>	
			        		<td>启用</td>
			        	</tr>
			        	</c:forEach>
			        </table>
			      </form>
			      <button class="subtn1" style="width: 150px;position: absolute;bottom: 25px;font-size: 16px;left: 280px" >
			      	确定
			      </button>
			      <button class="btn" style="width: 150px;position: absolute;bottom: 25px;font-size: 16px;right: 280px" >
			      	关闭
			      </button>
			      </div>
			</div>
			
			
		
	<div class="div_body" style="box-shadow: 0 0 5px #cccccc;height: 1000px">

	<!-- 详情页面 -->	
	
	<c:if test="${flag eq 1}">
		<div class="div_form">
			<form action="<%=path%>/DrivingSys/saveChangeClazz" class="form">
				<div class="jczl">
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">驾校&nbsp;:&nbsp;</span>
							<input  type="text" name="name"  value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">单据状态&nbsp;:&nbsp;</span>
							
							<select style="width: 234px;height: 31px" disabled="disabled" name="cfcd">
								<option value="1"></option>
								<option selected="selected" value="2">新增</option>
								<option value="3"></option>
								<option value="4"></option>
							</select>
							
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">单据编号&nbsp;:&nbsp;</span>
							<input type="text" disabled="disabled" name="fnumber">
						</div>
						<div class="input_hang">
							<span class="gn_name">当前班级&nbsp;:&nbsp;</span>
							<input type="text" disabled="disabled" class="cfcurrentclass" name="cfpp">
							<input type="hidden" name="cfcurrentclassid" class="cfcurrentclassid" value=""  >
						</div> 
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">业务日期&nbsp;:&nbsp;</span>
							<input type="text" id="rhrq" name="fbizdate" value="<%=date%>" onclick="WdatePicker({el:'rhrq',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'rhrq',dateFmt:'yyyy-MM-dd'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
						</div>
						<div class="input_hang">
							<span class="gn_name">当前班级金额&nbsp;:&nbsp;</span>
							<input type="text" disabled="disabled" class="cfamount" >
							<input type="hidden" class="cfamount" name="cfamount" value=""  >
						</div> 
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">备注&nbsp;:&nbsp;</span>
							<input type="text" id="rhrq" name="fdescription" >
						</div>
						<!-- <div class="input_hang">
							<span class="gn_name">实收金额&nbsp;:&nbsp;</span>
							<input type="text" disabled="disabled" class="cfshje" >
							<input type="hidden" class="cfshje" name="cfshje" value=""  >
						</div>  -->
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">手机&nbsp;:&nbsp;</span>
							<input type="text" class="cfmobile"  disabled="disabled" >
							<input type="hidden"  class="cfmobile"  name="cfmobile" value=""  >
						</div>
					</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name" >学员&nbsp;:&nbsp;</span>
							<input type="text" name="studentName" id="cfstudent" >
							<input type="hidden" name="cfstudentid" value=""  id="cfstudentid" >
							<span style="font-size: 14px;padding-left: 5px;color:#FF4D64">必填</span>
						</div>
						<div class="input_hang">
							<span class="gn_name">转入班级&nbsp;:&nbsp;</span>
							<input type="text" class="clazz" name="cfzrbjName" id="gmjg">
							<input type="hidden" name="cfzrbjid" value=""  id="gmjg1" >
							<span style="font-size: 14px;padding-left: 5px;color:#FF4D64">必填</span>
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">学员编码&nbsp;:&nbsp;</span>
							<input type="text"  class="cfstudentno" disabled="disabled" >
							<input type="hidden" class="cfstudentno" name="cfstudentno" value=""  >
						</div>
						<div class="input_hang">
							<span class="gn_name">转入班级金额&nbsp;:&nbsp;</span>
							<input type="text" value="" disabled="disabled" id="gmrq" >	
							<input type="hidden" name="cfbjje" id="gmrq1" value=""  >
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">身份证号码&nbsp;:&nbsp;</span>
							<input type="text" disabled="disabled" class="cfidcardno" >
							<input type="hidden" class="cfidcardno"  name="cfidcardno" value=""  >
						</div>
						<div class="input_hang">
							<span class="gn_name">创建者&nbsp;:&nbsp;</span>
							<input type="text" disabled="disabled"  id="llhy">
							<input type="hidden"  name="fhandlerid" value=""  >
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">入学日期&nbsp;:&nbsp;</span>
							<input disabled="disabled" type="text" id="njrq" class="cfrxrq" name="cfrxrq" onclick="WdatePicker({el:'njrq',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'njrq',dateFmt:'yyyy-MM-dd HH:mm:ss'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
				            <input type="hidden" id="njrq1" class="cfrxrq"  name="cfrxrq"  value=""  >
						</div>
						<div class="input_hang">
							<span class="gn_name">创建时间&nbsp;:&nbsp;</span>
							<input type="text" disabled="disabled" id="njdqr" name="fcreatetime" onclick="WdatePicker({el:'njdqr',dateFmt:'yyyy-MM-dd HH:mm:ss'})">
							<img onclick="WdatePicker({el:'njdqr',dateFmt:'yyyy-MM-dd HH:mm:ss'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">性别&nbsp;:&nbsp;</span>
							<input type="text" disabled="disabled" class="cfsex" id="jqxrq" name="cfsex" >	
							<input type="hidden"  name="cfsex"   class="cfsex1" value=""  >
						</div>
						<div class="input_hang">
							<span class="gn_name">审核人&nbsp;:&nbsp;</span>
							<input type="text" disabled="disabled" name="fhaseffected" >
							<input type="hidden"  name="fhaseffected"  value=""  >
						</div>
					</div>
					
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">电话&nbsp;:&nbsp;</span>
							<input type="text" id="kmstxzrq" class="cfphone"  disabled="disabled" >
							<input type="hidden" class="cfphone" name="cfphone" value=""  >
						</div>
					</div>
				<div class="div_tj" style="width: auto; margin-left: 140px;">
					<div>
						<input type="submit" onclick="return check()" class="input_submit bc" value="" style="margin-right: 30px;">
					</div>
					<div>
						<input type="button"    class="input_submit fh"   />
					</div>
				</div>
			</form>
		</div>
		</c:if>
		
		
     <!-- 查看页面 -->
		
	<c:if test="${flag eq 2 }">
		<div class="div_form">
			<form action="<%=path%>/DrivingSys/updateChangeClazz" class="form">
				<div class="jczl">
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">驾校&nbsp;:&nbsp;</span>
							<input  type="text" name="name" value="${changeClazz.cfficompanyName}" disabled="disabled" style="color: gray;"/>
							<input type="hidden" name="cfficompanyid" value="${changeClazz.cfficompanyid}" >
							<input type="hidden" name="fid" id="fid" value="${changeClazz.fid}" >
						</div>
						<div class="input_hang">
							<span class="gn_name">单据状态&nbsp;:&nbsp;</span>
							
							<select style="width: 234px;height: 31px" disabled="disabled" name="cfcd">
							<c:if test="${changeClazz.cfbillstate eq 3}">
								<option  value="1">保存</option>
							</c:if>
							<c:if test="${changeClazz.cfbillstate eq 4}">
								<option  value="1">提交</option>
							</c:if>
							<c:if test="${changeClazz.cfbillstate eq 5}">
								<option  value="1">审核</option>
							</c:if>
							</select>
							
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">单据编号&nbsp;:&nbsp;</span>
							<input type="text" id="fnumber" value="${changeClazz.fnumber}" disabled="disabled" name="fnumber">
						</div>
						<div class="input_hang">
							<span class="gn_name">当前班级&nbsp;:&nbsp;</span>
							<input type="text"  value="${changeClazz.cfcurrentclassName}" disabled="disabled" class="cfcurrentclass" name="cfpp">
							<input type="hidden" name="cfcurrentclassid" class="cfcurrentclassid" value="${changeClazz.cfcurrentclassid}"  >

						</div> 
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">业务日期&nbsp;:&nbsp;</span>
							<c:if test="${changeClazz.cfbillstate eq 3}">								
								<input type="text" id="rhrq" value="${changeClazz.fbizdate}" name="fbizdate" onclick="WdatePicker({el:'rhrq',dateFmt:'yyyy-MM-dd'})">
								<img onclick="WdatePicker({el:'rhrq',dateFmt:'yyyy-MM-dd'})" 
				            	src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
							</c:if>
							<c:if test="${changeClazz.cfbillstate ne 3}">
								<input type="text" disabled="disabled" id="rhrq" value="${changeClazz.fbizdate}" name="fbizdate" onclick="WdatePicker({el:'rhrq',dateFmt:'yyyy-MM-dd'})">
								<img  
				            	src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
							</c:if>
							
						</div>
						<div class="input_hang">
							<span class="gn_name">当前班级金额&nbsp;:&nbsp;</span>
							<input type="text" value="${changeClazz.cfamount}" disabled="disabled" class="cfamount" >
							<input type="hidden" class="cfamount" name="cfamount" value=""  >
						</div> 
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">备注&nbsp;:&nbsp;</span>
							<c:if test="${changeClazz.cfbillstate eq 3}">								
								<input type="text"  value="${changeClazz.fdescription}"  name="fdescription" >
							</c:if>
							<c:if test="${changeClazz.cfbillstate ne 3}">
								<input type="text" disabled="disabled" value="${changeClazz.fdescription}" name="fdescription" >
								<input type="hidden"  name="fdescription" value="${changeClazz.fdescription}"  >
							</c:if>
						</div>
						<!-- <div class="input_hang">
							<span class="gn_name">实收金额&nbsp;:&nbsp;</span>
							<input type="text" disabled="disabled" class="cfshje" >
							<input type="hidden" class="cfshje" name="cfshje" value=""  >
						</div>  -->
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">手机&nbsp;:&nbsp;</span>
							<input type="text" value="${changeClazz.cfmobile}"  class="cfmobile"  disabled="disabled" >
							<input type="hidden"  class="cfmobile"  name="cfmobile" value="${changeClazz.cfmobile}"  >
						</div>
					</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name" >学员&nbsp;:&nbsp;</span>
							<c:if test="${changeClazz.cfbillstate eq 3}">								
								<input type="text" value="${changeClazz.studentName}" id="cfstudent" >
								<input type="hidden" name="cfstudentid" value="${changeClazz.cfstudentid}"  id="cfstudentid" >
							</c:if>
							<c:if test="${changeClazz.cfbillstate ne 3}">								
								<input type="text" disabled="disabled" value="${changeClazz.studentName}" id="cfstudent" >
								<input type="hidden" disabled="disabled" name="cfstudentid" value="${changeClazz.cfstudentid}"  id="cfstudentid" >
							</c:if>
						</div>
						<div class="input_hang">
							<span class="gn_name">转入班级&nbsp;:&nbsp;</span>
							<c:if test="${changeClazz.cfbillstate eq 3}">								
								<input type="text"  value="${changeClazz.cfzrbjName}" class="clazz" name="cfzrbjName" id="gmjg">
								<input type="hidden" name="cfzrbjid" value="${changeClazz.cfzrbjid}"  id="gmjg1" > 
							</c:if>
							<c:if test="${changeClazz.cfbillstate ne 3}">								
								<input type="text" disabled="disabled" value="${changeClazz.cfzrbjName}" class="clazz" name="cfzrbjName" id="gmjg">
							<input type="hidden" disabled="disabled" name="cfzrbjid" value=""  id="gmjg1" >
							</c:if>
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">学员编码&nbsp;:&nbsp;</span>
							<input type="text" value="${changeClazz.cfstudentno}"  class="cfstudentno" disabled="disabled" >
							<input type="hidden" class="cfstudentno" name="cfstudentno" value="${changeClazz.cfstudentno}"  >
						</div>
						<div class="input_hang">
							<span class="gn_name">转入班级金额&nbsp;:&nbsp;</span>
							<input type="text" value="${changeClazz.cfbjje}" disabled="disabled" id="gmrq" >	
							<input type="hidden" name="cfbjje" id="gmrq1" value="${changeClazz.cfbjje}"  >
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">身份证号码&nbsp;:&nbsp;</span>
							<input type="text" value="${changeClazz.cfidcardno}" disabled="disabled" class="cfidcardno" >
							<input type="hidden" class="cfidcardno"  name="cfidcardno" value="${changeClazz.cfidcardno}"  >
						</div>
						<div class="input_hang">
							<span class="gn_name">创建者&nbsp;:&nbsp;</span>
							<input type="text" value="${changeClazz.fcreateName}" disabled="disabled"  id="llhy">
							<input type="hidden"   value=""  >
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">入学日期&nbsp;:&nbsp;</span>
							<input value="${changeClazz.cfrxrq}" disabled="disabled" type="text" id="njrq" class="cfrxrq" name="cfrxrq" onclick="WdatePicker({el:'njrq',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'njrq',dateFmt:'yyyy-MM-dd HH:mm:ss'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
				            <input type="hidden" id="njrq1" class="cfrxrq"  name="cfrxrq"  value="${changeClazz.cfrxrq}"  >
						</div>
						<div class="input_hang">
							<span class="gn_name">创建时间&nbsp;:&nbsp;</span>
							<input type="text" value="${changeClazz.fcreatetime}" disabled="disabled" id="njdqr" name="fcreatetime" onclick="WdatePicker({el:'njdqr',dateFmt:'yyyy-MM-dd HH:mm:ss'})">
							<img onclick="WdatePicker({el:'njdqr',dateFmt:'yyyy-MM-dd HH:mm:ss'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">性别&nbsp;:&nbsp;</span>
							<c:if test="${changeClazz.cfsex eq 1}">
							   <input type="text" value="男"  disabled="disabled" class="cfsex" id="jqxrq" name="cfsex" >
							</c:if>
							<c:if test="${changeClazz.cfsex eq 2}">
							   <input type="text" value="女生"  disabled="disabled" class="cfsex" id="jqxrq" name="cfsex" >	
							</c:if>
							<input type="hidden"  name="cfsex"   class="cfsex1" value=""  >
						</div>
						<div class="input_hang">
							<span class="gn_name">审核人&nbsp;:&nbsp;</span>
							<input type="text" value="${changeClazz.fauditorName}"  disabled="disabled" name="fhaseffected" >
							<input type="hidden"  name="fhaseffected"  value=""  >
						</div>
					</div>
					
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">电话&nbsp;:&nbsp;</span>
							<input type="text" value="${changeClazz.cfphone}" id="kmstxzrq" class="cfphone"  disabled="disabled" >
							<input type="hidden" class="cfphone"  value=""  >
						</div>
					</div>
				<div class="div_tj">
				
				<c:if test="${changeClazz.cfbillstate eq 3}">
					<shiro:hasPermission name="/selChangeClazzById">
					<div>
						<input type="submit" onclick="return check()" class="input_submit bc" value="">
					</div>
					</shiro:hasPermission>
					<shiro:hasPermission name="/submitChangeClazz">
                    <div>
                        <input onclick="return submitFlow()" class="input_submit tj" value="" type="submit">
                    </div>
					</shiro:hasPermission>
				</c:if>
                    <c:if test="${changeClazz.cfbillstate ne 3}">
                    <c:if test="${changeClazz.cfbillstate eq 4}">
						<shiro:hasPermission name="/checkChangeBillState">
							<c:if test="${seeFlag eq true}">
						<div>
							<input  onclick="return agreeCommon()" class="input_submit sh" value="" type="submit" >
						</div>
							</c:if>
						</shiro:hasPermission>
                    </c:if>
						<shiro:hasPermission name="/uncheckChangeBillState">
							<div>
								<input  onclick="return unagreeCommon()" class="input_submit fsh" value="" type="submit" >
							</div>
						</shiro:hasPermission>
                    </c:if>

					<div>
						<input type="button" class="input_submit cklc" value="" onclick="lookActivitiImg('publicProcess',$('#fnumber').val())">
					</div>
					<div style="margin-left: 60px">
							<input type="button"   class="input_submit fh"   <%--onclick="history.back(-1)"--%>/>
					</div>
				</div>
			</form>
		</div>
	</c:if>

	</div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp"%>
<script type="text/javascript" src="<%=path%>/HoganJS/handlebars-v4.0.11.js"></script>
<script id="table-template" type="text/x-handlebars-template">
    {{#isNull sList}}
    <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
        <th style="width: 20px"></th>
        <th>名称</th>
        <th>编码</th>
        <th>描述</th>
        <th>创建时间</th>
        <th>用户名</th>
        <th>别名</th>
        <th>最后修改时间</th>
        <th>用户名</th>
        <th>别名</th>
        <th>财务组织</th>
        <th>身份证号码</th>
        <th>出生日期</th>
        <th>家庭住址</th>
        <th>联系地址</th>
        <th>暂住证号</th>
        <th>手机</th>
        <th>联系电话</th>
        <th>邮政编码</th>
        <th>申领类型</th>
        <th>现准驾车型号</th>
        <th>申请准驾车型号</th>
        <th>入学日期</th>
        <th>推荐人</th>
        <th>班级</th>
        <th>金额</th>
    </tr>
    {{#each sList}}
    <tr class="studentData" >
        <td style="display: none;width: 20px;"><input type="text" class="fseq" name="fid" value="{{fid}}"
        ></td>
        <td><input type="checkbox" value="{{fid}}" name="student"/></td>
        <td>{{fnameL2}}</td>
        <td>{{fnumber}}</td>
        <td>{{fdescriptionl2}}</td>
        <td>{{fcreatetime}}</td>
        <td>{{createName}}</td>
        <td>{{createName}}</td>
        <td>{{flastupdatetime}}</td>
        <td>{{updateName}}</td>
        <td>{{updateName}}</td>
        <td>{{cfficompanyName}}</td>
        <td>{{cfidcardno}}</td>
        <td>{{cfbirthdays}}</td>
        <td>{{cfaddress}}</td>
        <td>{{cflinkaddress}}</td>
        <td>{{cfzzzh}}</td>
        <td>{{cfsjhm}}</td>
        <td>{{cflxdh}}</td>
        <td>{{cfcfwz}}</td>
        {{#compare cfsllx 1}}
        <td>初次申领</td>
        {{else}}
        <td>增加准驾车型</td>
        {{/compare}}
        {{#compare cfxzjcxdh 'NULL'}}
        <td></td>
        {{else}}
        <td>{{cfxzjcxdh}}</td>
        {{/compare}}
        <td>{{cfslzjcxdh}}</td>
        <td>{{fcreatetime}}</td>
        <td>{{cftjrName}}</td>
        <td>{{cfclazzName}}</td>
        <td>{{cfamount}}</td>
    </tr>
    {{/each}}
    {{else}}
    <td>没有搜索到您想要的内容!</td>
    {{/isNull}}

</script>
<script type="text/javascript">

    $(document).ready(function () {
        var type = "${type}";
        if (type == '0' || type == '' || type == null) {

        } else {
            //alert("添加成功");
            editAlert();
        }
    })


    function check(){
        if($('#cfstudent').val() == ''){
            alert('请选择学员')
            return false;
        }
        if($('#gmjg').val() == ''){
            alert('请选择转入班级')
            return false;
        }
        if($('#rhrq').val() == '' || $('#rhrq').val() == null ){
            alert('请选择业务日期')
            return false;
		}
        //防止表单重复提交
        $('form').submit(function() {
            if(typeof jQuery.data(this, "disabledOnSubmit") == 'undefined') {
                jQuery.data(this, "disabledOnSubmit", { submited: true });
                $('input[type=submit], input[type=button]', this).each(function() {
                    $(this).attr("disabled", "disabled");
                });
                return true;
            }
            else
            {
                return false;
            }
        });
    }


    function submitFlow(){
        $.messager.confirm('提示', '是否提交该单据?', function (r) {
            if (r) {
                $.ajax({
                    url: '<%=path%>/DrivingSys/submitChangeClazz',
                    type: "post",
                    data: {
                        'fnumber': $('#fnumber').val(),
                        'fid' : $("#fid").val()
                    },
                    dataType: "json",
                    success: function (res) {
                       /* showAlert(res.msg,'/selChangeClazz/look.action')*/
                        showAlert(res.msg,'/selChangeClazzById?fid='+$("#fid").val())
                      /*  location = '<%=path%>/DrivingSys/selChangeClazz/look.action';*/
                    },
                    error: function () {
                        alert('错误');
                    }
                });
            }
        })
		return false;
    }

    function agreeCommon() {
        $('.modal-data9').css('visibility','visible')
        $('#modal-overlay').css('visibility','visible')
        return false

    }
    function unagreeCommon() {
        $('.modal-data10').css('visibility','visible')
        $('#modal-overlay').css('visibility','visible')
        return false
    }

    $('#auditsubmit').click(function () {
        $('.auditcheck').each(function () {
            if ($(this).is(':checked')) {
                $.ajax({
                    url: '<%=path%>/DrivingSys/checkChangeBillState',
                    type: "post",
                    data: {
                        'fid': $('#fid').val(),
                        'fnumber': $('#fnumber').val(),
                        'state':5,
                        'agreed': $(this).val(),
                        'auditcomment': $('#auditcomment').val()
                    },
                    dataType: "json",
                    success: function (res) {
                       /* showAlert(res.msg,'/selChangeClazz/look.action')*/
                        showAlert(res.msg,'/selChangeClazzById?fid='+$("#fid").val()	)
                       /* alert('审核成功')
                        location = '<%=path%>/DrivingSys/selChangeClazz/look.action';*/
                    },
                    error: function () {
                        alert('错误');
                    }
                })
            } else {

            }
        })
    })

    /*反审核*/
    $('#againstAuditsubmit').click(function () {
        $.ajax({
            url: '<%=path%>/DrivingSys/checkChangeBillState',
            type: "post",
            data: {
                'fid': $('#fid').val(),
                'fnumber': $('#fnumber').val(),
                'state': 3,
                'agreed': 0,
                'auditcomment': $('#auditcomment').val()
            },
            dataType: "json",
            success: function (res) {
                /*showAlert(res.msg,'/selChangeClazz/look.action')*/
                showAlert(res.msg,'/selChangeClazzById?fid='+$("#fid").val()	)
                /*alert(res.msg)
                location= '<%=path%>/DrivingSys/selChangeClazz/look.action';*/
            },
            error: function () {
                alert('错误');
            }
        })
    })

	$(document).ready(function(){

        /**/
		
		$('#input_check').click(function(){
			var fid=$('#fid').val()
		    location.href='<%=path%>/DrivingSys/changeBillState?fid='+fid
		})
		
			
		$('#input_check1').click(function(){
			var fid=$('#fid').val()
			alert(fid)
			var str='<%=path%>/DrivingSys/changeBillState?fid='+fid
		    location.href='<%=path%>/DrivingSys/changeBillState?fid='+fid
		})
		
		
		/* 查询班级   */
		$('.clazz').click(function(){
			$('#modal-overlay').css('visibility','visible')
			$('.modal-data1').css('visibility','visible')
			$('input:checkbox').removeAttr('checked');
		})
		
		/* 关闭弹出框    */
		$('.btn').click(function(){
		$('#modal-overlay').css('visibility','hidden')
		$('.modal-data').css('visibility','hidden')
		$('.modal-data1').css('visibility','hidden')
		$('input:checkbox').removeAttr('checked');
		$('.page').hide();
		})
		
		$('.subtn1').click(function(){
		  var spCodesTemp = "";
	      $('input:checkbox[name=train]:checked').each(function(i){
	       if(0==i){
	        spCodesTemp = $(this).val();
	       }else{
	        spCodesTemp += (","+$(this).val());
	       }
	      });
            if(spCodesTemp == "null" || spCodesTemp == ""){
                alert("请选择班级")
            }else {
                $.ajax({
                    url: '<%=path%>/DrivingSys/selClazzById',
                    type: "post",
                    data: {'id': spCodesTemp},
                    dataType: "json",
                    success: function (json) {
                        $('#gmrq').val(json[0].cfprice)
                        $('#gmrq1').val(json[0].cfprice)
                        $('#gmjg').val(json[0].fnameL2)
                        $('#gmjg1').val(json[0].fid)
                        $('#modal-overlay').css('visibility', 'hidden')
                        $('.modal-data1').css('visibility', 'hidden')
                    },
                    error: function () {
                        alert('Error');
                    }
                });
            }
	})
	
	
	
	
	$('.subtn').click(function(){
		  var spCodesTemp = "";
	      $('input:checkbox[name=student]:checked').each(function(i){
	       if(0==i){
	        spCodesTemp = $(this).val();
	       }else{
	        spCodesTemp += (","+$(this).val());
	       }
	      });
        if(spCodesTemp == "null" || spCodesTemp == ""){
            alert("请选择学员")
        }else {
            $.ajax({
                url: '<%=path%>/DrivingSys/selStudentById',
                type: "post",
                data: {'fid': spCodesTemp},
                dataType: "json",
                success: function (json) {
                    $('.cfamount').val(json.cfamount)
                    $('.cfcurrentclass').val(json.cfclazzName)
                    $('.cfcurrentclassid').val(json.cfclazzid)
                    $('.cfmobile').val(json.cfsjhm)
                    $('.cfidcardno').val(json.cfidcardno)
                    $('.cfstudentno').val(json.fnumber)
                    $('.cfphone').val(json.cflxdh)
                    $('.cfrxrq').val(json.cfrxsj)
                    if (json.cfsex == 1) {
                        $('.cfsex').val("男")
                    } else if (json.cfsex == 2) {
                        $('.cfsex').val("女生")
                    }
                    $('.cfsex1').val(json.cfsex)
                    $('#cfstudent').val(json.fnameL2)
                    $('#cfstudentid').val(json.fid)
                    $('#modal-overlay').css('visibility', 'hidden')
                    $('.modal-data').css('visibility', 'hidden')
                },
                error: function () {
                    alert('Error');
                }
            });
        }
	})
		
	
	
	 //点击查找按钮
    $('.findBtn').click(function () {
        var index = 0;
        myname = $('.myname').val();
        cflxdh = $('.cflxdh').val();
        $('#studebntList').html("<div class='loading'></div>");
        $.ajax({
            url: '<%=path%>/DrivingSys/getPage1?pindex=0&name=' + myname + '&cflxdh=' + cflxdh + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
            type: "get",
            dataType: "json",
            success: function (res) {
                $('#studebntList').html(myTemplate(res));
                $('#totalPage').val(res.pb);
            },
            error: function () {
                alert('Error');
            }
        });

    })
	
	
	
	
	
	
	
	
	
	
	$('.findBtn1').click(function(){
		 var name=$('.name1').val()
			 $.ajax({
				    url:'<%=path%>/DrivingSys/selClazzByName', 
				    type: "post",
				    data:{'name':name},
				    dataType:"json",         	
				    success: function(json) {
		            var str=''
		            for(var i=0;i<json.length;i++) {
		               str+='<tr class="clazzData" style="margin-top: 45px" ><td><input style="width: 15px;height: 15px" '
		               str+='type="checkbox" name="train"  value="'+json[i].fid+'"></td>'
		               if( json[i].fnumber != null){
		        	   str+='<td>'+json[i].fnumber+'</td><td>'+json[i].fnameL2+'</td>'
		               }else{
		            	str+='<td></td><td>'+json[i].fnameL2+'</td>'  
		               }
		               if(json[i].fsimplename!=null){
		            	str+='<td>'+json[i].cfprice+'</td><td>'+json[i].fsimplename+'</td>'	
		               }else{
		                str+='<td>'+json[i].cfprice+'</td><td></td>'   
		               }
		               if(json[i].fdescriptionL2!=null){
			            	str+='<td>'+json[i].fdescriptionL2+'</td><td>'+json[i].fcreatetime+'</td>'	
			               }else{
			                str+='<td></td><td>'+json[i].fcreatetime+'</td>'   
			               }
	        		   str+='<td>'+json[i].createName+'</td><td>'+json[i].flastupdatetime+'</td>'
	        		   str+='<td>'+json[i].updateName+'</td><td>'+json[i].cfficompanyName+'</td>'
	        		   if(json[i].cfsycl!=null){
	        			   str+='<td>'+json[i].cfsycl+'</td>'
	        		   }else{
	        			   str+='<td></td>' 
	        		   }	   
	        		   if (json[i].cfksf == '1'){
	        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
	        		   } else {
	        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
	        		   }
		               if (json[i].cflc == '1'){
		        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
		        		   } else {
		        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
		        	   }
		               if(json[i].cfvip=='1'){
		        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
		        		   }else{
		        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
		        	   }
		               if(json[i].cftx=='1'){
		        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
		        		   }else{
		        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
		        	   }
		               str+='<td>启用</td></tr>'
		            }
		            $(".head1 tr:not(':first')").remove()
		            $('.head1').append(str)
					},  
	 				error: function(){alert('Error');} 
	 	 			});
			
		})		
				
		
		$('#cfstudent').click(function(){
			$('#modal-overlay').css('visibility','visible')
			$('.modal-data').css('visibility','visible')
			$('input:checkbox').removeAttr('checked');
			$('#index').val(1)
			$('.page').show();
		})
		
	
		$('.subtn1').click(function(){
		  var spCodesTemp = "";
	      $('input:checkbox[name=train]:checked').each(function(i){
	       if(0==i){
	        spCodesTemp = $(this).val();
	       }else{
	        spCodesTemp += (","+$(this).val());
	       }
	      });
	      
	      $.ajax({
			    url:'<%=path%>/DrivingSys/selClazzById', 
			    type: "post",
			    data:{'id':spCodesTemp},
			    dataType:"json",         	
			    success: function(json) {	
	            $('#gmrq').val(json[0].cfprice)
	            $('#gmrq1').val(json[0].cfprice)
	            $('#gmjg').val(json[0].fnameL2)
	            $('#gmjg1').val(json[0].fid)           
	            $('#modal-overlay').css('visibility','hidden')
				$('.modal-data1').css('visibility','hidden')
				},  
				error: function(){alert('Error');} 
	 			});
		})

        //单击选中复选框
        $("tr").live('click',function(){
            var check = $(this).find("input[type='checkbox']");
            if(check){
                var flag = check[0].checked;
                if(flag){
                    check[0].checked = false;
                }else{
                    check[0].checked = true;
                }
            }
            $("tr input[type='checkbox']").attr("checked", false);
            $(this).find("input[type='checkbox']").attr("checked", true);
        });

        //阻止复选框进行冒泡事件
        $("tr input[type='checkbox']").live('click',function(e){
            e.stopPropagation();
        });


        $(function(){
	        $(':checkbox[type="checkbox"]').each(function(){
	            $(this).click(function(){
	                if($(this).attr('checked')){
	                    $(':checkbox[type="checkbox"]').removeAttr('checked');
	                    $(this).attr('checked','checked');
	                }
	            });
	        });
	    });
		
		
		$('.input_submit.fh').click(function(){
            parent.closeSelectCard()

            //location.href='<%=path%>/DrivingSys/selChangeClazz/look.action'
		})


	})
	
	
	<%-- 	function page(index){
		alert(index)
		$.ajax({
		    url:'<%=path%>/DrivingSys/getPage', 
		    type: "post",
		    data:{'pindex':index},
		    dataType:"json",         	
		    success: function(json) {	
				
			},  
			error: function(){alert('Error');} 
 			});
	} --%>
	/* 分页js */
	
		var updateid = new Array();
			var myTemplate1html = "";
			//处理删除时候的this缓存
			var _this;
			//判断当前操作使增加还是删除
			var stu;
			//返回的当前选中的元素序号
			var feq;
			//元素更新标示
			var updata;

			//弹出框模版文件
		    var myTemplate = Handlebars.compile($("#table-template").html());
			
			//注册一个比较大小的Helper,判断v1是否大于v2
			Handlebars.registerHelper("compare", function (v1, v2, options) {
			    if (v1 == v2) {
			        //满足添加继续执行
			        return options.fn(this);
			    } else {
			        //不满足条件执行{{else}}部分
			        return options.inverse(this);
			    }
			});
			//注册一个比较内容是否为空
			Handlebars.registerHelper("isNull", function (v1, options) {
			    if (v1 != "") {
			        //满足添加继续执行
			        return options.fn(this);
			    } else {
			        //不满足条件执行{{else}}部分
			        return options.inverse(this);
			    }
			});
			//注册索引+1的helper
			Handlebars.registerHelper("addOne", function (index) {
			    //返回+1之后的结果
			    //判断当前选中的元素
			
			    //返回当前元素的序列号
			    if (updata == 20) {
			        updata = 0;
			        return feq;
			    }
			
			    var tr_len = $("#recordinList .tr_td").length + 1;
			
			    return tr_len + index;
			
			});
	
	
	var beginTime = $("#datemin")
    var endTime = $("#datemax")
    var myname = $('.myname').val();
    var cflxdh = $('.cflxdh').val();

	$('.indexPage').click(function(){
		var index=0
		$('#index').val(0)
		$.ajax({
			url: '<%=path%>/DrivingSys/getPage1?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
		    type: "post",
		    /* data:{"pindex":index,"cflxdh":cflxdh,"name":name,"endTime":endTime,"beginTime":beginTime}, */
		    dataType:"json",         	
		    success: function(json) {	
		    	$('#studebntList').html(myTemplate(json));
			},  
			error: function(){alert('Error');} 
 			});
	})
	
	
	
	  $('.endPage').click(function () {
          myname = $('.name1').val();
        var index = parseInt($('#totalPage').val())
        $('#index').val(index)
        $.ajax({
            url: '<%=path%>/DrivingSys/getPage1?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
            type: "get",
            dataType: "json",
            success: function (json) {
                $('#studebntList').html(myTemplate(json));
            },
            error: function () {
                alert('Error');
            }
        });
    })


    $('.nextPage').click(function () {
        myname = $('.name1').val();
        var total = parseInt($('#totalPage').val())
        if ($('#index').val() < total) {
            var index = $('#index').val() - 0 + 1
            $('#index').val(index)
            $.ajax({
                url: '<%=path%>/DrivingSys/getPage1?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),

                type: "get",
                dataType: "json",
                success: function (json) {
                    $('#studebntList').html(myTemplate(json));
                },
                error: function () {
                    alert('Error');
                }
            });
        } else {
            alert("已经到尾页了！")
        }
    })


    $('.prevPage').click(function () {
        myname = $('.name1').val();
        if ($('#index').val() != '0') {
            var index = $('#index').val() - 0 - 1
            $('#index').val(index)
            $.ajax({
                url: '<%=path%>/DrivingSys/getPage1?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
                type: "get",
                dataType: "json",
                success: function (json) {
                    $('#studebntList').html(myTemplate(json));
                },
                error: function () {
                    alert('Error');
                }
            });
        } else {
            alert("已经是首页了")
        }
    })

    $('.studentData').live('dblclick',function(){
        spCodesTemp = $(this).find('input').val()
        $.ajax({
            url:'<%=path%>/DrivingSys/selStudentById',
            type: "post",
            data:{'fid':spCodesTemp},
            dataType:"json",
            success: function(json) {
                $('.cfamount').val(json.cfamount)
                $('.cfcurrentclass').val(json.cfclazzName)
                $('.cfcurrentclassid').val(json.cfclazzid)
                $('.cfmobile').val(json.cfsjhm)
                $('.cfidcardno').val(json.cfidcardno)
                $('.cfstudentno').val(json.fnumber)
                $('.cfphone').val(json.cflxdh)
                $('.cfrxrq').val(json.cfrxsj)
                if(json.cfsex==1){
                    $('.cfsex').val("男")
                }else if(json.cfsex==2){
                    $('.cfsex').val("女生")
                }
                $('.cfsex1').val(json.cfsex)
                $('#cfstudent').val(json.fnameL2)
                $('#cfstudentid').val(json.fid)
                $('#modal-overlay').css('visibility','hidden')
                $('.modal-data').css('visibility','hidden')
            },
            error: function(){alert('Error');}
        });
    })


    $('.clazzData').live('dblclick',function(){
        spCodesTemp = $(this).find('input').val()
        $.ajax({
            url:'<%=path%>/DrivingSys/selClazzById',
            type: "post",
            data:{'id':spCodesTemp},
            dataType:"json",
            success: function(json) {
                $('#gmrq').val(json[0].cfprice)
                $('#gmrq1').val(json[0].cfprice)
                $('#gmjg').val(json[0].fnameL2)
                $('#gmjg1').val(json[0].fid)
                $('#modal-overlay').css('visibility','hidden')
                $('.modal-data1').css('visibility','hidden')
            },
            error: function(){alert('Error');}
        });
    })
	
    
	
</script>
</html>